package com.guobox.movies.entity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by xxl on 16/7/27.
 */
public class MovieType {

    private long typeId;
    private String typeName;
    private int typeCode;
    List<MovieEntity> movieEntities;
    public int getTypeCode() {
        return this.typeCode;
    }
    public void setTypeCode(int typeCode) {
        this.typeCode = typeCode;
    }
    public String getTypeName() {
        return this.typeName;
    }
    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
    public long getTypeId() {
        return this.typeId;
    }
    public void setTypeId(long typeId) {
        this.typeId = typeId;
    }
    private static final String[] movieTypeName = new String[]{
            "全部",
            "动作",
            "喜剧",
            "爱情",
            "文艺",
            "科幻",
            "悬疑",
            "剧情",
            "动画",
            "犯罪",
            "惊悚",
            "纪录"
    };
    @Override
    public String toString() {
        return "MovieType{" +
                "typeCode=" + typeCode +
                ", typeName='" + typeName + '\'' +
                ", typeId=" + typeId +
                '}';
    }

    public static List<MovieType> getMovieTypes() {
        List<MovieType> movieTypes = new ArrayList<>();
        MovieType movieType;
        for (int i = 0; i < movieTypeName.length; i++) {
            movieType = new MovieType();
            movieType.setTypeCode(i);
            movieType.setTypeName(movieTypeName[i]);
            movieType.setTypeId(i);
            movieTypes.add(movieType);
        }
        return movieTypes;

    }
}
